﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using SD.Database.Classes;

namespace smallDeimos
{
    public partial class BestPL : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
       /// <summary>
       /// Used on ASP page to show the PL instead of exp
       /// </summary>
       /// <param name="val"></param>
       /// <returns></returns>
        protected string PL(object val)
        {
            if (val == null) return "0";
            int exp;
            if (int.TryParse(val.ToString(), out exp) == true)
            {
                return Equations.PlayerLevel(exp).ToString();
            }
            else
            { return "0"; }
        }
    }
}
